<template>
    <van-dialog v-model:show="show" title="标题" show-cancel-button @confirm="confirm" :before-close="onBeforeClose" style="width: 70%;">
        <van-field label="标签" v-model="value" placeholder="请输入" required style="margin: 20px 0;"></van-field>
    </van-dialog>
</template>

<script setup>
import { ref } from 'vue'
import { tool } from '@/moduleExport'

const show = ref(false)
const value = ref('')

const open = () => {

    show.value = true
}

const onBeforeClose = (action) => {
    if (action === "confirm") {
        return false
    } else return true
}

const confirm = () => {

    show.value = false
}

defineExpose({ open })
</script>

<style lang="scss" scoped>
</style>